package day8;

public class Parent {
    protected void test1(){

    }

    public one test2(){
        return null;
    }
}

class Child extends Parent{
    //验证是否是正确的重写规则
    //1.访问修饰符相同，或者不能严于父类
    //父类是protected 子类只能是protected或者public
    @Override
    public void test1(){

    }
    //2.返回值类型相同，或者是其子类
    @Override
    public two test2(){return null;}
}

class one{}
class two extends one{}
